package com.muyu.system.service;

import com.muyu.common.core.domain.Result;
import com.muyu.system.domain.DanmoShoppingProducts;
import com.muyu.system.dto.AddCartDTO;
import com.muyu.system.req.DanmoShoppingProductsPriceReq;
import com.muyu.system.req.ShoppingCartDto;

import java.util.List;

/**
 * 商品Service接口
 *
 * @author yangle
 * @date 2024-09-29
 */
public interface IDanmoShoppingProductsService
{
    /**
     * 查询商品
     *
     * @param productId 商品主键
     * @return 商品
     */
    public DanmoShoppingProducts selectDanmoShoppingProductsById(Long productId);

    /**
     * 查询商品列表
     *
     * @param danmoShoppingProducts 商品
     * @return 商品集合
     */
    public List<DanmoShoppingProducts> selectDanmoShoppingProductsList(DanmoShoppingProducts danmoShoppingProducts);

    /**
     * 新增商品
     *
     * @param danmoShoppingProducts 商品
     * @return 结果
     */
    public Result<String> insertDanmoShoppingProducts(DanmoShoppingProducts danmoShoppingProducts);

    /**
     * 修改商品
     *
     * @param danmoShoppingProducts 商品
     * @return 结果
     */
    public Result<String> updateDanmoShoppingProducts(DanmoShoppingProducts danmoShoppingProducts);

    /**
     * 批量删除商品
     *
     * @param ids 需要删除的商品主键集合
     * @return 结果
     */
    public int deleteDanmoShoppingProductsByIds(Long[] ids);


//    public int deleteDanmoShoppingProductsById(Long id);

    List<DanmoShoppingProducts> selectPriceSort(DanmoShoppingProductsPriceReq danmoShoppingProductsPriceReq);

    List<DanmoShoppingProducts> salesSortList(DanmoShoppingProductsPriceReq danmoShoppingProductsPriceReq);

    /**
     * 评分排行榜
     * @param danmoShoppingProductsCommentsNumbersReq
     * @return
     */
    List<DanmoShoppingProducts> commentsNumbersSort(DanmoShoppingProductsPriceReq danmoShoppingProductsCommentsNumbersReq);

    /**
     * 添加到购物车
     * @param addCartDTO
     */
    Result addCart(AddCartDTO addCartDTO);

    DanmoShoppingProducts selectDanmoShoppingProductsAndSkuById(Long productId, Long shoppingSkuId);

    /**
     * 排行榜
     * @param danmoShoppingProductsPriceReq
     * @return
     */
    List<DanmoShoppingProductsPriceReq> commentsNumbersSortTop(DanmoShoppingProductsPriceReq danmoShoppingProductsPriceReq);
}
